import config from "@/config";
import http from "@/utils/request";

export default {
	upload: {
		url: `${config.API_URL}/upload`,
		name: "文件上传",
		post: async function (data, config = {}) {
			// eslint-disable-next-line no-debugger
			//debugger
			var result = await http.post(this.url, data, config);
			console.log(result);
			
			
			// var result = {
			// 	code: 200,
			// 	message: "",
			// 	data:{
			// 		"id": "04A23eC2-5EFc-0BDF-8ae8-f9C545CB6AC6",
			// 		"src": "http://dummyimage.com/200x200/d9f279/FFF&text=SCUI&_=.png",
			// 		"fileName": "24BD7CA1-eE59-E7A2-0A53-5A7f7AAeE3b6.png"
			// 	}
			// };
			return result;
		},
	},
	uploadFile: {
		url: `${config.API_URL}/upload`,
		name: "附件上传",
		post: async function (data, config = {}) {
			// eslint-disable-next-line no-debugger
			//debugger
			var result = await http.post(this.url, data, config);
			console.log(data,config);
			// eslint-disable-next-line no-debugger
			
			// var result = {
			// 	code: 200,
			// 	message: "",
			// 	data:{
			// 		"id": "7947bEC3-27cA-7CAE-ab21-742ac94Af1FE",
			// 		"src": "http://www.scuiadmin.com/files/52000019700522223X.xlsx",
			// 		"fileName": "52000019700522223X.xlsx"
			// 	}
			// };
			return result;
		},
	},
	exportFile: {
		url: `${config.API_URL}/fileExport`,
		name: "导出附件",
		get: async function (data, config = {}) {
			var result = await http.get(this.url, data, config);
			// eslint-disable-next-line no-debugger
			return result;
		},
	},
	importFile: {
		url: `${config.API_URL}/fileImport`,
		name: "导入附件",
		post: async function (data, config = {}) {
			console.log(data,config);
			//var result = await http.post(this.url, data, config);
			// eslint-disable-next-line no-debugger
			var result = {
				code: 200,
				message: "",
				data: {
					"fail": 12,
					"ok": 1388,
					"failList": [
						{
							"keyName": "Amy Hernandez",
							"reason": "Hyse Fjor Cibqtfxsh Zfhxww Rbmg Hkfhmk Sverrqlo"
						},
						{
							"keyName": "Larry Perez",
							"reason": "Buclxexsb Soysdfn Cuboiwdvt Ydum Uqmp Mpenlua"
						},
						{
							"keyName": "Timothy Hernandez",
							"reason": "Pismljmty Skxi Ego Dscmor Mhguxusu Mfmctl Vhob"
						},
						{
							"keyName": "Jennifer Lee",
							"reason": "Brgjbikp Yevgfw Gadxscg Ntpwrt Owhuvy Wbvw"
						},
						{
							"keyName": "Cynthia Jones",
							"reason": "Uyylbhotbb Smmnlrnum Vwdctp Lvrfdloq Schnbbmqz"
						},
						{
							"keyName": "Mark Harris",
							"reason": "Scuma Awkkj Qcnkmk Gflyce Fwb Mbg Syce"
						},
						{
							"keyName": "Jennifer Clark",
							"reason": "Eboixirdp Zrxoi Wpe Ybvxrcbzl Vrqzmdch"
						},
						{
							"keyName": "Jennifer Anderson",
							"reason": "Dwf Pcanutc Tbnntj Usebjb Sixujrruk"
						},
						{
							"keyName": "Kimberly Hall",
							"reason": "Knhvhwfns Isojyjt Uok"
						},
						{
							"keyName": "William Lewis",
							"reason": "Alsc Uhdv Svxw Pryscx Gtuicuy Yfuvjzv"
						},
						{
							"keyName": "John Rodriguez",
							"reason": "Rfmqnw Hwcjo Nxup Yudksfub Ijrfmmfvv Qnsyyijedx"
						},
						{
							"keyName": "Amy Williams",
							"reason": "Jlgmqoce Lwhumldmp Ckllrvafr Dwmw Pna Uqhl Hmqsxk"
						}
					]
				}
			};
			return result;
		},
	},
	file: {
		menu: {
			url: `${config.API_URL}/file/menu`,
			name: "获取文件分类",
			get: async function () {
				//var result = await http.get(this.url);
				// eslint-disable-next-line no-debugger
				
				var result = {
					code: 200,
					message: "",
					data: [
						{
							"id": "",
							"label": "未分组"
						},
						{
							"id": "100",
							"label": "素材"
						},
						{
							"id": "200",
							"label": "证件"
						}
					]
				};
				return result;
			},
		},
		list: {
			url: `${config.API_URL}/file/list`,
			name: "获取文件列表",
			get: async function (params) {
				console.log(params);
				//var result = await http.get(this.url, params);
				// eslint-disable-next-line no-debugger
				
				var result = {
					code: 200,
					message: "",
					data: {
						"total": 85060,
						"page": 1,
						"pageSize": 20,
						"rows": [
							{
								"id": "53f7B45c-cCc0-AFad-c27C-FF8562f55fB2",
								"url": "http://dummyimage.com/200x200/ddd/333&text=Steven Robinson&_=.png",
								"fileName": "e3BEF9B8-796c-d5F7-6d31-CBCCfEC7222e.png"
							},
							{
								"id": "FAc1AdA5-9c37-c8e4-E95A-A3ACbc63A4A4",
								"url": "http://dummyimage.com/200x200/ddd/333&text=Michelle Martin&_=.png",
								"fileName": "57C6FB4f-dC5b-4BC1-8BC0-Fb7Dd81B2DbA.png"
							},
							{
								"id": "5dDEdE82-C605-1cC3-2eFe-6c5dFd9CF994",
								"url": "http://dummyimage.com/200x200/ddd/333&text=Scott Smith&_=.png",
								"fileName": "B11cc1fb-fb1f-52A1-feab-52EfD5Fe8D5D.png"
							},
							{
								"id": "fdF52eDC-F4e6-EcFe-F37d-748a5A53fB5C",
								"url": "http://dummyimage.com/200x200/ddd/333&text=Timothy Davis&_=.png",
								"fileName": "d5ABA1FD-c6f6-3Df6-5AfE-C8b7C643A434.png"
							},
							{
								"id": "545C0bbb-c1E8-AF72-9eEa-c92a012A8b16",
								"url": "http://dummyimage.com/200x200/ddd/333&text=Robert Harris&_=.png",
								"fileName": "017C14B7-Da2D-D5ed-5D3B-091919AF25Bf.png"
							},
							{
								"id": "BEADD20e-D8c8-DbAB-11d6-3bEFeC7D25FD",
								"url": "http://dummyimage.com/200x200/ddd/333&text=Jason Robinson&_=.png",
								"fileName": "C9efD3BE-A1A7-A482-d42f-633576Ed49Bd.png"
							},
							{
								"id": "7aCA8cCE-FBbB-d7c9-bEb7-E6DE2336b842",
								"url": "http://dummyimage.com/200x200/ddd/333&text=Barbara Martin&_=.png",
								"fileName": "2FDF798A-b14f-34e4-F6b1-C9cCD67ddbFC.png"
							},
							{
								"id": "54e69c6b-c22E-0E4A-60DF-3D1be9317c6B",
								"url": "http://dummyimage.com/200x200/ddd/333&text=Kimberly Jackson&_=.png",
								"fileName": "429Aa4F9-33AD-ffc4-0ed7-A60E45481016.png"
							},
							{
								"id": "D430A1Ed-Fed6-7ABE-bb26-2CC31a8A6546",
								"url": "http://dummyimage.com/200x200/ddd/333&text=Betty Hall&_=.png",
								"fileName": "dAdccb91-8A76-dDBe-ec47-B921d0fe8dff.png"
							},
							{
								"id": "11cBCE48-Ce0a-a5a6-FCFe-BDB777746EB9",
								"url": "http://dummyimage.com/200x200/ddd/333&text=Joseph Taylor&_=.png",
								"fileName": "0bcaF8C7-B481-1c8C-3db4-DDDAABebcAb9.png"
							},
							{
								"id": "aE4bFCe7-dBb4-DE48-514f-1FD6fd81324C",
								"url": "http://dummyimage.com/200x200/ddd/333&text=Robert Williams&_=.png",
								"fileName": "E9F9B8eb-4ceA-24cf-dC1B-A84cC7bf3cB9.png"
							},
							{
								"id": "88f7e8ab-b0eE-Fdec-e1A0-beAc7DCAD9Dd",
								"url": "http://dummyimage.com/200x200/ddd/333&text=Jennifer Thompson&_=.png",
								"fileName": "fF3bEB4B-8D30-e3F5-EAb8-dA0bbeABEB4E.png"
							},
							{
								"id": "40c5A054-3Ac7-14BE-EDF6-D4B02BAfd246",
								"url": "http://dummyimage.com/200x200/ddd/333&text=Jennifer Lopez&_=.png",
								"fileName": "be8B7b35-Dff8-Bdd2-fFc1-7a5B9D6125A2.png"
							},
							{
								"id": "fb7bF959-C2f9-D888-4ebA-E9cbDEAAc22C",
								"url": "http://dummyimage.com/200x200/ddd/333&text=Margaret Martinez&_=.png",
								"fileName": "Ab3e90ce-A4a0-D4b5-bb56-2b350d61F47F.png"
							},
							{
								"id": "d57fFafE-678f-DBdA-4D40-eaD0EDc16Ca2",
								"url": "http://dummyimage.com/200x200/ddd/333&text=Betty Harris&_=.png",
								"fileName": "ceD3FAeB-e09f-FBb9-5FA3-5FcFca9b8A93.png"
							},
							{
								"id": "dc23E334-78fB-AA88-baD9-e9668cdc9FF1",
								"url": "http://dummyimage.com/200x200/ddd/333&text=Charles Taylor&_=.png",
								"fileName": "5F4716d9-52fe-9b5E-CAa7-C369d0afc9c9.png"
							},
							{
								"id": "E9cd01cb-35ae-CBfC-c251-Eaad5bbE0e5B",
								"url": "http://dummyimage.com/200x200/ddd/333&text=Thomas Hernandez&_=.png",
								"fileName": "21faFE0E-7672-5fFC-Cf9B-FBC33Cb60Fd2.png"
							},
							{
								"id": "77bb7DE2-11F8-CB1F-0DF6-6f3dCE8Fc21c",
								"url": "http://dummyimage.com/200x200/ddd/333&text=Melissa Lopez&_=.png",
								"fileName": "b17a1DA1-DfFC-Ab3C-Cd3C-5CE5ECD72Dfd.png"
							},
							{
								"id": "1Ce54D86-bb40-f1FC-44c6-C13eEa2cC380",
								"url": "http://dummyimage.com/200x200/ddd/333&text=Kimberly Miller&_=.png",
								"fileName": "cC9B9D2B-d5DD-b398-542f-c828eECc6EE3.png"
							},
							{
								"id": "0AAACedb-93FF-BA06-38e1-D6e2EDFFCAC2",
								"url": "http://dummyimage.com/200x200/ddd/333&text=Barbara Hall&_=.png",
								"fileName": "27CCB7CE-647A-Add9-B475-AF63134f882B.png"
							},
							{
								"id": "17fCAdf2-Bd12-8B93-b6fF-c9cacCD0ABB4",
								"url": "http://dummyimage.com/200x200/ddd/333&text=Michael Clark&_=.png",
								"fileName": "e950264d-49EE-02b1-efFE-C4CbB3da92aD.png"
							},
							{
								"id": "BAFCAA87-cFD6-D8AC-2DBd-Fff6c606eA17",
								"url": "http://dummyimage.com/200x200/ddd/333&text=Kenneth Thomas&_=.png",
								"fileName": "07ABA8fC-d215-5eCF-Dff6-55CdC7e0E857.png"
							},
							{
								"id": "7Ce5fcfA-2462-1A27-fA8b-860Dc7B4C6bb",
								"url": "http://dummyimage.com/200x200/ddd/333&text=Melissa Anderson&_=.png",
								"fileName": "0eea3C1e-35cC-bCD9-5eD1-F3B63698296e.png"
							},
							{
								"id": "13dCDB7F-54bC-8754-5B2b-0D5ded8DC385",
								"url": "http://dummyimage.com/200x200/ddd/333&text=Richard Hall&_=.png",
								"fileName": "E68EbF3C-AF6E-09Fa-A2ec-ae2bfbAFDDf1.png"
							},
							{
								"id": "d22AB495-cDdd-Dc6b-6425-f57b7c76FDD3",
								"url": "http://dummyimage.com/200x200/ddd/333&text=Ronald Martinez&_=.png",
								"fileName": "8a5Af64f-7BBf-FFE3-FdbB-036b1c9A4BeC.png"
							},
							{
								"id": "Ab52fCA6-9ebC-7cD9-Af8b-fACf2cF49D0E",
								"url": "http://dummyimage.com/200x200/ddd/333&text=Deborah Hall&_=.png",
								"fileName": "374dce38-03CC-C2f2-7F0F-ef0f96c814c1.png"
							},
							{
								"id": "F3BB35FF-4905-d1b1-1fc2-65BeAFADc01C",
								"url": "http://dummyimage.com/200x200/ddd/333&text=Amy Walker&_=.png",
								"fileName": "1BAC7923-CB28-f9Ba-1a5C-1b62E791242F.png"
							},
							{
								"id": "A5112B55-C290-0cA9-99Db-1AfCE3eCCb18",
								"url": "http://dummyimage.com/200x200/ddd/333&text=Matthew Davis&_=.png",
								"fileName": "6A06CfbA-3BD0-5C41-caA7-3AB4e558F35e.png"
							},
							{
								"id": "4c9dd8Dd-b36A-Ab3D-382b-Cd42CD9c7adD",
								"url": "http://dummyimage.com/200x200/ddd/333&text=Helen Wilson&_=.png",
								"fileName": "e2715F5d-8cFd-a1Ac-81d3-cAF8ffCEde37.png"
							},
							{
								"id": "DB51D748-77d4-fF1e-A5CA-4b74ECaE77FE",
								"url": "http://dummyimage.com/200x200/ddd/333&text=Brian Wilson&_=.png",
								"fileName": "A525C6B4-c6AB-b8A0-AbCC-Bd9CcE59ADEa.png"
							},
							{
								"id": "cE51D194-CA61-d7fc-8C6e-5e3A9Ac51DA6",
								"url": "http://dummyimage.com/200x200/ddd/333&text=Brenda White&_=.png",
								"fileName": "7B6dE981-bb1F-8249-af58-316EA6261FbB.png"
							},
							{
								"id": "cb332423-eFc0-E8fd-B745-eEDcE8C4AEcc",
								"url": "http://dummyimage.com/200x200/ddd/333&text=Jason Wilson&_=.png",
								"fileName": "1F4D2BAb-7cec-1CDE-DfFf-d1B776cFd3Bf.png"
							},
							{
								"id": "f5cF6106-cf79-d53f-1Cfe-24CFb338Ce86",
								"url": "http://dummyimage.com/200x200/ddd/333&text=Larry Williams&_=.png",
								"fileName": "E959815e-d7b0-9aBd-3952-0F67Cd34964D.png"
							},
							{
								"id": "dC8ae2D6-ABC5-d3fE-694b-EEEa29eBB0fD",
								"url": "http://dummyimage.com/200x200/ddd/333&text=Richard Hernandez&_=.png",
								"fileName": "52821f2F-bb58-deA7-93C8-b7601613C8b1.png"
							},
							{
								"id": "4a6fB2f7-6a54-6764-02e6-8Ba4cFcBACFA",
								"url": "http://dummyimage.com/200x200/ddd/333&text=Joseph Martinez&_=.png",
								"fileName": "ffE8309e-F034-E65c-55C4-cB57e2BBAbCC.png"
							},
							{
								"id": "e923Ed29-9F4c-A4fa-b269-8763922eF6a9",
								"url": "http://dummyimage.com/200x200/ddd/333&text=Ronald Harris&_=.png",
								"fileName": "F72c51eC-3C3d-9Df7-b15f-9f63e7CFFAD7.png"
							},
							{
								"id": "F090828c-bB1B-14Bd-8875-A6AE9EfCd1cd",
								"url": "http://dummyimage.com/200x200/ddd/333&text=Robert Walker&_=.png",
								"fileName": "Aeb774Ef-24B8-F56f-63d3-3A1d6F5bBdE8.png"
							},
							{
								"id": "1221fC7c-B6Bb-31A6-AEc1-88Ad7d7c17CB",
								"url": "http://dummyimage.com/200x200/ddd/333&text=Scott Lewis&_=.png",
								"fileName": "1C120F5b-C1C3-AB2E-Efcc-E93FEd166c3f.png"
							},
							{
								"id": "5F4bCA26-7345-e4Ef-6964-7964E9C5Fd43",
								"url": "http://dummyimage.com/200x200/ddd/333&text=James Walker&_=.png",
								"fileName": "c894385A-C6b9-9b37-cDFE-fd5fD5D6E99c.png"
							},
							{
								"id": "Ac29fFDB-efC9-362E-173c-12f191BE52eA",
								"url": "http://dummyimage.com/200x200/ddd/333&text=William Garcia&_=.png",
								"fileName": "Fa3d1d77-F2cD-4c7B-EaC1-777EeEef9F7d.png"
							}
						]
					}
				};
				return result;
			},
		},
	},
};
